package com.tfswue.group.listener;

import ch.qos.logback.classic.Logger;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;
import org.slf4j.LoggerFactory;

@WebListener

public class MyContextListener implements ServletContextListener {
    private static final Logger log = (Logger) LoggerFactory.getLogger(MyContextListener.class);

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        log.info("web应用启动，初始化成功");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        log.info("web应用销毁,结束");
    }
}
